<template>
    <div>
        <h1>显示</h1>
        <table class="table table-burder">
            <tbody>
                <tr>
                    <td>会员编号</td>
                    <td>会员名称</td>
                    <td>联系方式</td>
                    <td>身份证</td>
                    <td>状态</td>
                    <td>积分</td>
                    <td>会员余额</td>
                    <td>会员等级</td>
                    <td>操作</td>
                </tr>
                <tr v-for="item in data " :key="item.id">
                    <td>{{item.userCode}}</td>
                    <td>{{item.name}}</td>
                    <td>{{item.phone}}</td>
                    <td>{{item.code}}</td>
                    <td>{{item.state}}</td>
                    <td>{{item.jifen}}</td>
                    <td>{{item.moey}}</td>
                    <td>{{item.levellID}}</td>
                    <td>{{item.photo}}</td>
                </tr>
            </tbody>
        </table>
    </div>
</template>

<script setup lang="ts">
import { reactive,ref,onMounted } from 'vue';
import axios from 'axios'
import { useRoute,useRouter } from 'vue-router';

const router=useRouter();
const route=useRoute();

let data:any=ref([]);
axios({
    url:'https://localhost:7161/api/Zuser/Getlist',
    method:'get'
})
.then(ref=>{
    console.log(ref);
    data.value=ref.data;
})
.catch(err=>{
    console.log(err);
})




</script>